package com.travel;

import com.github.pagehelper.PageInfo;
import com.travel.Bean.Culture;
import com.travel.Dao.CultureMapper;
import com.travel.Service.Impl.CultureServiceImpl;
import com.travel.util.RedisUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class springtest {


    @Autowired
    private RedisUtil redisUtil;

   @Test
   public void RedisTest(){
       redisUtil.set("test:test1","testValue");
       redisUtil.set("test:test2","testValue");
       redisUtil.set("test:test3","testValue");
       System.out.println(redisUtil.get("test:test1"));
       Scanner scanner = new Scanner(System.in);
       scanner.next();
       redisUtil.delKeys("test");
   }


    @Autowired
    private CultureServiceImpl cultureService;
   @Autowired
   private CultureMapper cultureMapper;

@Test
   public void CultureTest(){
       PageInfo<Culture> culturePageInfo = cultureService.selCultureList(null,1,15);

    List<Culture> cultures = cultureMapper.selCultureList(null);
       Scanner sc = new Scanner(System.in);
   }


}
